package com.ag.zrt.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.common.BaseAction;
import com.ag.zrt.service.ZRTIUserRoleService;

@Controller("ZRTUserRoleAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class ZRTUserRoleAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5268109561763036895L;

	private String UId;
	private String eventId;
	@Resource(name = "ZRTUserRoleService")
	private ZRTIUserRoleService userRoleService;

	public String getEventId() {
		return eventId;
	}

	public void setEventId(String eventId) {
		this.eventId = eventId;
	}

	public String getUId() {
		return UId;
	}

	public void setUId(String uId) {
		UId = uId;
	}

	public void setUserRoleService(ZRTIUserRoleService userRoleService) {
		this.userRoleService = userRoleService;
	}

	public String changViceCommender() {
		try {
			System.out.println("*************begin  change**************-/-*/-/-*/-*/-*/-*/-*/");
			userRoleService.chang(UId, eventId);
			System.out.println("*************end  change**************-/-*/-/-*/-*/-*/-*/-*/");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "changViceCommender_succ";
	}

}
